﻿<%@ page language="java" pageEncoding="UTF-8"
	errorPage="/ui/defaultException.jsp"%>
<%@include file="/ui/tags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${trip.name }详细-禅境旅行</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<%@include file="/ui/portal/commonjscss.jsp"%>
<link
	href="${cpath}/resources/portal/js/layer-v1.7.0/layer/skin/layer.css"
	rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="page">
		<%@include file="/ui/portal/head.jsp"%>
		<div id="container" class="container margin10">
			<div class="trip-step4-details-back">
				<c:if test="${editor }">
					<a href="${cpath }/trip/edit/preview?tid=${trip.tripId}">返回</a>
				</c:if>
				<c:if test="${!editor }">
					<a href="${cpath }/trip/${trip.tripId}">返回</a>
				</c:if>
			</div>
			<div class=" trip-step4-info borderallnone">
				<div class="trip-step4-info-show boderallccc">
					<div class="trip-step4-info-show-d paddingtop5">
						<div class="details4">
							<div class="subtitle4">${trip.name}</div>
							<div class="subdetails4">
								<div>旅行路线: ${destRoute}</div>
								<div>旅行距离: ${trip.distance}公里</div>
								<div>途径地点: ${categoryStat}</div>
							</div>
						</div>
						<div class="details5">
							<c:if test="${trip.price > 0 }">
								<span class="price5">￥：<em>${trip.price }</em>/人</span>
							</c:if>

							<c:if test="${!empty trip.bookUrl }">
								<span class="yd4"><a href="${trip.bookUrl }"
									target="_blank">预定</a>
								</span>
							</c:if>
							<span></span>
							<c:if test="${!empty  trip.departureCity}">
								<span>出发城市： ${trip.departureCity }</span>
							</c:if>
							<c:if test="${!empty trip.departureDate }">
								<span>出发日期：<fmt:formatDate value="${trip.departureDate}"
										pattern="yyyy.MM.dd" />
								</span>
							</c:if>
							<span>旅行天数：${trip.days }</span>
						</div>
					</div>
					<div class="clear"></div>
				</div>
				<div class="trip-step4-info-commend bodertopnone">
					<div class="trip-step4-info-commend-title">
						<div class="trip-step4-info-commend-title-left">去程航班</div>
						<div class="trip-step4-info-commend-title-left">返程航班</div>
					</div>
					<div class="trip-step4-info-commend-air-left">
						<c:forEach var="f" items="${goflights }">
							<div class="trip-step4-info-commend-air">
								<div class="l4">
									<span class="address4">${f.departureCity }</span> <span
										class="time4"><fmt:formatDate
											value="${f.departureTime}" pattern="HH:mm" />
									</span> <span class="date4"><fmt:formatDate
											value="${f.departureTime}" pattern="yyyy.MM.dd" />
									</span> <span class="airport4">${f.departureAirport }</span>
								</div>
								<div class="m4">
									<span class="air4"> <c:if test="${!empty f.icon }">
											<img src="${image_domain }${f.icon}" />
										</c:if> ${f.airline }</span> <span class="airtime4">飞行时长(<zen:interval
											to="${f.arriveTime }" from="${f.departureTime }" />)</span>
								</div>
								<div class="r4">
									<span class="address4">${f.arriveCity }</span> <span
										class="time4"><fmt:formatDate value="${f.arriveTime}"
											pattern="HH:mm" />
									</span> <span class="date4"><fmt:formatDate
											value="${f.arriveTime}" pattern="yyyy.MM.dd" />
									</span> <span class="airport4">${f.arriveAirport }</span>
								</div>
							</div>
						</c:forEach>
					</div>
					<div class="trip-step4-info-commend-air-right">
						<c:forEach var="f" items="${backflights }">
							<div class="trip-step4-info-commend-air">
								<div class="l4">
									<span class="address4">${f.departureCity }</span> <span
										class="time4"><fmt:formatDate
											value="${f.departureTime}" pattern="HH:mm" />
									</span> <span class="date4"><fmt:formatDate
											value="${f.departureTime}" pattern="yyyy.MM.dd" />
									</span> <span class="airport4">${f.departureAirport }</span>
								</div>
								<div class="m4">
									<span class="air4"> <c:if test="${!empty f.icon }">
											<img src="${image_domain }${f.icon}" />
										</c:if> ${f.airline }</span> <span class="airtime4">飞行时长(<zen:interval
											to="${f.arriveTime }" from="${f.departureTime }" />)</span>
								</div>
								<div class="r4">
									<span class="address4">${f.arriveCity }</span> <span
										class="time4"><fmt:formatDate value="${f.arriveTime}"
											pattern="HH:mm" />
									</span> <span class="date4"><fmt:formatDate
											value="${f.arriveTime}" pattern="yyyy.MM.dd" />
									</span> <span class="airport4">${f.arriveAirport }</span>
								</div>
							</div>
						</c:forEach>
					</div>
				</div>
				<div class="clear1"></div>
			</div>
			<div class="trip-area-step3-info">
				<c:forEach var="daily" items="${dailys }" varStatus="status">
					<div id="daily${status.count }" class="trip-area-step3-info-list">
						<div class="step3-info-titleinfo paddingtop10 bodertopccc">
							<div class="step3-info-title">
								<em>第${status.count }天</em>
								<c:forEach var="dest" items="${daily.tripdests}">
						  		${dest.name }&nbsp;&nbsp;
						  	</c:forEach>
							</div>
							<div class="step3-info-title2">
								<c:if test="${fn:length(daily.tripDailyLocations) > 0  }">
									<div class="infoa">${fn:length(daily.tripDailyLocations)
										} 地点</div>
								</c:if>
								<c:if test="${daily.distance > 0 }">
									<div class="infob">
										<fmt:formatNumber value="${daily.distance }" pattern="#.#" />
										公里
									</div>
								</c:if>
								<div class="infoc">
									<c:if test="${daily.costTime > 0 }">
										<zen:interval interval="${daily.costTime }" />
									</c:if>
									<c:if test="${fn:length(daily.tripDailyLocations) > 0  }">
										<img src="${cpath }/resources/portal/img/trip/p.png"
											dailyid="#daily${status.count }" />
									</c:if>
								</div>
							</div>
						</div>
						<div class="trip-area-step3-info-map  bordernone"
							style="display: none;"></div>
						<div class="step3-info-l">
							<c:forEach var="loc" items="${daily.tripDailyLocations }"
								varStatus="status">
								<div class="step3-info-m" data-lat="${loc.lat }"
									data-lng="${loc.lng }"
									data-location_name="${loc.locationName }">
									<div class="step3-info-m-img">
										<c:choose>
											<c:when test="${fn:contains(loc.image,'trip_traffic')}">
												<img src="${image_domain }${loc.image}" />
											</c:when>
											<c:otherwise>
												<img src="${image_domain }${loc.image}@!small" />
											</c:otherwise>
										</c:choose>
									</div>
									<div class="step3-info-m-title">
										<em>${status.count }.</em> <a class="location_name"
											href="javascript:void(0);"
											url="${cpath }/trip/location/${loc.locationId}">${loc.locationName
											}</a>
										<c:if test="${loc.distance > 0 }">
											<span class="otherlength">距离：<fmt:formatNumber
													value="${loc.distance }" pattern="#.#" />公里</span>
											<img src="${cpath }${loc.trafficIcon}" />
											<span class="othertime"><zen:interval
													interval="${loc.costTime }" />
											</span>
										</c:if>
										<c:if test="${loc.stayTime > 0 }">
											<span class="othertime">停留<zen:interval
													interval="${loc.stayTime }" />
											</span>
										</c:if>
										<span class="otherline"></span>
									</div>
									<div class="step3-info-m-note">${loc.summary }</div>
								</div>
							</c:forEach>
							<div class=" clear"></div>
						</div>
					</div>
				</c:forEach>
				<div class=" clear1"></div>
			</div>
			<div class=" clear1"></div>
		</div>
		<%@include file="/ui/portal/footer.jsp"%>
	</div>
</body>
<script
	src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBXF4z-R35SvrcxQNsQJUd6JIs4X1fAoZw&sensor=false&libraries=places,drawing&hl=zh-CN"></script>
<script src="${cpath}/resources/portal/js/trip.js"
	type="text/javascript"></script>
<script
	src="${cpath}/resources/portal/js/layer-v1.7.0/layer/layer.min.js"
	type="text/javascript"></script>
<script src="${cpath}/resources/portal/js/jquery.imgresize.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
	$(function() {
		TripAPI.init("${cpath}");
		$(".step3-info-title2 img").toggle(function() {
			var dailyid = $(this).attr("dailyid");

			if ($(this).data("maped")) {
				var map = $(dailyid + " .trip-area-step3-info-map").tripmap();
				map.show();
			} else {
				$(this).data("maped", true);
				$(dailyid + " .trip-area-step3-info-map").show();
				var map = $(dailyid + " .trip-area-step3-info-map").tripmap();
				map.show();
				var items = [];
				$(dailyid + " .step3-info-m").each(function(i, e) {
					items.push($(e).data());
				});
				map.createMarkers(items);
				map.linkMarkers();
				map.adjustMapView();
			}
		}, function() {
			var dailyid = $(this).attr("dailyid");
			var map = $(dailyid + " .trip-area-step3-info-map").tripmap();
			map.hide();
		});

		$(".step3-info-m-title .location_name").click(function() {
			//页面层例一
			var index;
			var $this = $(this);
			var url = $this.attr("url");
			var opts = {
				shade : [ 0.5, '#000', true ],
				type : 1,
				fix : false,
				area : [ '1000px', 'auto' ],
				closeBtn : [ 0, true ],
				title : false,
				border : [ 0 ],
				offset : [ '50%', '50%' ],
				page : {
					load : "<div class='layer-pop-loading'></div>",
					url : url,
					ok : function(data) {
						$this.data("loaded", data);
						layer.autoArea(index);
						$(".trip-area-stepdetails-info-img").imgresize();
					}
				},
				close : function(index) {
					layer.close(index);
				},
				loading : {
					type : 1
				},
				success : function() {
					$(".trip-area-stepdetails-info-img").imgresize();
				}
			};
			if ($this.data("loaded")) {
				opts.page.html = $this.data("loaded");
			}
			index = $.layer(opts);
		});
		$(".step3-info-m-img").imgresize();

	});
//-->
</script>

</html>
